// Script assets have changed for v2.3.0 see
// https://help.yoyogames.com/hc/en-us/articles/360005277377 for more information
function scr_room_door(){
	
	
	with(obj_mask)
	{
		randomize();
		var _door_max=2;
		var _num=0;
		do
		{
			if(irandom(1))
			{
				var _i=irandom_range(i,i+w-1)*2+1;//随机一个门在显示地图的横坐标
				var _j=choose(j*2,(j+h-1)*2+1+1);//随机一个门在显示地图的纵坐标
			}else
			{
				var _i=choose((i+w-1)*2+1+1,i*2);
				var _j=irandom_range(j,j+h-1)*2+1;
			}
		
		if(_i==0||_j==0||_i==MAP_SHOW_WIDTH-1||_j==MAP_SHOW_HEIGHT-1)continue;
		else{
		_num++;
		other.map_show_grid_[# _i,_j]=FLOOR;
		instance_create_depth(_i*16+8,_j*16+8,-10,obj_mask);
		}
		}until(_num==_door_max);
	}
	

}